package com.panda.controller.category;


import com.panda.service.CategoryService;
import com.panda.utils.RespondResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/categories")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping
    public RespondResult getCategories(){
        return categoryService.getCategoryList();
    }

}
